package Adapter;

import util.Console;

public class AudioPlayer implements MediaPlayer {
    MediaAdapter mediaAdapter;
    @Override
    public void play(String audioType, String fileName) {
        if(audioType.equalsIgnoreCase("mp3")){
            Console.log("Playing mp3 file. Name: "+fileName);
        }
        else if(audioType.equalsIgnoreCase("vlc")
            ||  audioType.equalsIgnoreCase("mp4")){
            mediaAdapter = new MediaAdapter(audioType);
            mediaAdapter.play(audioType,fileName);

        }
        else{
            Console.log("Invalid media");
        }
    }
}
